﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using System.Data;
using System.Text;
using Utils;
using System.Collections.Specialized;
using System.Web.Security;


public partial class order_chinabank_Send : BasePage
{

    // Fields
    protected string pmode_id;
    protected string remark1;
    protected string remark2;
    private Maticsoft.BLL.System systemBll = new Maticsoft.BLL.System();
    private Maticsoft.Model.System systemModel = new Maticsoft.Model.System();
    protected string v_amount;
    protected string v_md5info;
    protected string v_mid;
    protected string v_moneytype;
    protected string v_oid;
    protected string v_orderaddr;
    protected string v_orderemail;
    protected string v_ordermobile;
    protected string v_ordername;
    protected string v_orderpost;
    protected string v_ordertel;
    protected string v_rcvaddr;
    protected string v_rcvemail;
    protected string v_rcvmobile;
    protected string v_rcvname;
    protected string v_rcvpost;
    protected string v_rcvtel;
    protected string v_url;

    // Methods
    protected void Page_Load(object sender, EventArgs e)
    {
        this.setValue();
    }

    private void setValue()
    {
        string chinabanksec = "";
        this.systemModel = this.systemBll.GetModel(1);
        if ((this.systemModel != null) && (this.systemModel.chinabankmid != ""))
        {
            this.v_mid = this.systemModel.chinabankmid;
            chinabanksec = this.systemModel.chinabanksec;
        }
        this.v_url = base.WWWprefix + "order/chinabank/Receive.aspx";
        if ((base.Request.Form["out_trade_no"] != null) && (base.Request.Form["out_trade_no"].ToString() != ""))
        {
            this.v_oid = base.Request.Form["out_trade_no"].ToString();
        }
        if ((base.Request.Form["total_fee"] != null) && (base.Request.Form["total_fee"].ToString() != ""))
        {
            this.v_amount = base.Request.Form["total_fee"].ToString();
        }
        if ((this.v_oid == null) || this.v_oid.Equals(""))
        {
            DateTime now = DateTime.Now;
            string str2 = now.ToString("yyyyMMdd");
            string str3 = now.ToString("HHmmss");
            this.v_oid = str2 + this.v_mid + str3;
        }
        if ((base.Request.Form["subject"] != null) && (base.Request.Form["subject"].ToString() != ""))
        {
            this.remark1 = base.Request.Form["subject"].ToString();
        }
        this.remark2 = base.Request["remark2"];
        this.v_moneytype = "CNY";
        string password = this.v_amount + this.v_moneytype + this.v_oid + this.v_mid + this.v_url + chinabanksec;
        this.v_md5info = FormsAuthentication.HashPasswordForStoringInConfigFile(password, "md5").ToUpper();
        this.v_rcvname = base.Request["v_rcvname"];
        this.v_rcvaddr = base.Request["v_rcvaddr"];
        this.v_rcvtel = base.Request["v_rcvtel"];
        this.v_rcvpost = base.Request["v_rcvpost"];
        this.v_rcvemail = base.Request["v_rcvemail"];
        this.v_rcvmobile = base.Request["v_rcvmobile"];
        this.v_ordername = base.Request["v_ordername"];
        this.v_orderaddr = base.Request["v_orderaddr"];
        this.v_ordertel = base.Request["v_ordertel"];
        this.v_orderpost = base.Request["v_orderpost"];
        this.v_orderemail = base.Request["v_orderemail"];
        this.v_ordermobile = base.Request["v_ordermobile"];
    }


}